package enum_.singleton;

/**
 * Created with IntelliJ IDEA.
 * ClassName: BankTest1
 * Package: enum_.singleton
 * Description:
 * User: fzykd
 *
 * @Author: LQH
 * Date: 2023-11-27
 * Time: 12:34
 */

//枚举实现单例模式 jdk1.5之前的写法
public class BankTest1 {

    public static void main(String[] args) {



    }

}

class Bank1 {

    private Bank1() {
    }

    public static final Bank1 instance = new Bank1();

}

enum Bank2 {

    CPB;

}

enum GirlFriend {

    XIAO_LI(20);

    private final int age;

    private GirlFriend(int age) {
        this.age = age;
    }

}
